package com.palmshop.online.controller;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.palmshop.online.entity.PalmResult;
import com.palmshop.online.service.ReturnListService;

/**
 * 退货相关的controller;
 * @author quan
 */
@Controller
@RequestMapping("/returnList")
public class ReturnListContorller {

	@Resource
	private ReturnListService service;//service注入


	/**
	 * 根据订单唯一性标识向退货表中添加一条退货信息
	 * @param saleListUnique:订单唯一性标识
	 * @return json
	 */
	@RequestMapping("/addReturnList.do")
	@ResponseBody
	public PalmResult addReturnList(String saleListUnique){
		return service.addReturnList(saleListUnique);
	}
	
	
	/**
	 * 根据退货单唯一性标识删除对应的退货信息
	 * @param retListUnique：退货唯一性标识
	 * @return json
	 */
	@RequestMapping("/deleteReturnList.do")
	@ResponseBody
	public PalmResult deleteReturnList(String retListUnique){
		return service.deleteReturnList(retListUnique);
	}


}
